package com.jcoinexchange.match.engine;

import lombok.Data;

@Data
public class Order {
    private Long orderId;
    private OrderType type;       // LIMIT/MARKET
    private OrderSide side;       // BUY/SELL
    private double price;         // 限价单有效
    private double quantity;
    private long timestamp;
    private OrderStatus status;   // OPEN/PARTIALLY_FILLED/CANCELED



    public enum OrderType{
        LIMIT,
        MARKET,
        ;
    }

    public enum OrderSide{
        BUY(1),
        SALE(2),
        ;
        private final int code;

        OrderSide(int code) {
            this.code = code;
        }

        public int getCode() {
            return code;
        }
    }

}
